import { IRouterParamContext } from 'koa-router'

// 全局扩展类型定义 process.env.NODE_ENV
declare global {
  namespace NodeJS {
    interface ProcessEnv {
      NODE_ENV: 'dev' | 'prd'
    }
  }
}
// IRouterParamContext 扩展  koa-router ctx语法提示例: ctx.params
declare module 'koa' {
  interface BaseContext extends IRouterParamContext {
    success: (data: any, msg?: string) => { data: any; msg: any; code: number }
    fail: (msg: any) => { msg: any; code: number }
  }
}
export {}